Distributed Clock (Synchronization)
This mechanism leads to very low jitter of significantly less than 1µs. Even if the communication cycle jitters, it is still compliant with the IEEE 1588 Precision Time Protocol standard.
EtherCAT does not require special hardware in the master device and can be implemented in software on any standard Ethernet MAC, even without a dedicated communication coprocessor.
- The typical process of establishing a distributed clock is initiated by the master by sending a broadcast to all slaves at a specific address.
- This process can be repeated as many times as required to reduce jitter and to average out values.
- Total delays are calculated for each slave depending on their position in the slave-ring and are uploaded to an offset register.
- Finally the master issues a broadcast read-write on the system clock, which makes the first slave the reference clock and forcing all other slaves to set their internal clock appropriately with the now known offset.
To keep the clocks synchronized after initialization, the master or slave must regularly send out the broadcast again to counter any effects of speed difference between the internal clocks of each slave.
- Each slave has to adjust the speed of their internal clock or implement an internal correction mechanism whenever they have to adjust.
- The system clock is specified as a 32-bit counter with a base unit of 1 ns starting at January 1st 2000, 0:00.
Figure 1: Synchronicity and Simultaneousness
Scope view of two distributed devices with 300 nodes and 120 m of cable between them.